<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page import="javax.servlet.http.HttpServletRequest" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>Login</title>
    <!-- CSS -->
    <link href="<%= request.getContextPath()%>/style/style.css" type="text/css" rel="stylesheet" />
    <link href="<%= request.getContextPath()%>/style/ie6.css" type="text/css" rel="stylesheet" />

    <!-- Javascript -->
    <script type="text/javascript" src="<%= request.getContextPath()%>/script/jquery-1.2.6.js"></script>
    <script type="text/javascript" src="<%= request.getContextPath()%>/script/main.js"></script>
    <script type="text/javascript" src="<%= request.getContextPath()%>/script/hover_button.js"></script>
    <script type="text/javascript">
        function resetPassLogin(submitAction){
            afterSubmitRedirect("login", "designer/resetpassword/resetpass.html", submitAction, "submitAction");
        }

        function login(submitAction){
            afterSubmitRedirect("login", "designer/userlogin/login.html", submitAction, "submitAction");
        }
    </script>
</head>
<!--Start Body  -->
<body>
    <div id="wrapper">
        <div class="header">
            <h1><a href="#">logo</a></h1>
            <div class="logon">
            <span>Version:${version}&nbsp;&nbsp;&nbsp;&nbsp;<a href="#">Help</a></span></div>
        </div>

        <!--START: content -->
        <div class="content2">
            <div class="insider">
                <div class="corners">
                    <div class="corners_top"></div>
                    <div class="column1">
                        <div class="col_l">

                            <form id="login" action="login" method="post">
                                <table width="440" border="0" cellspacing="4" class="formlayout_table">
                                    <tr>
                                        <th width="188"><label>Username:</label></th>
                                        <td width="240"><input name="username" type="text" id="username" value="${LAST_USERNAME_KEY}" class="input1" /></td>
                                    </tr>

                                    <tr>
                                        <th><label for="Password">Password:</label></th>
                                        <td><input name="password" type="password" id="password" class="input1" onkeydown="if (event.keyCode==13)login('submit')"/></td>
                                    </tr>
                                </table>
                                <c:if test="${hasErrors}">
                                    <font color="red">
                                        ${errors['password.errors'][0]}<br>
                                        ${errors['confirmPassword.errors'][0]}<br>
                                    </font>
                                </c:if>
                            </form>
                        </div>
                    </div>

                    <!-- Start Function1 -->
                    <ul class="functions1">
                        <li>
                            <a href="#" onclick="login('submit');">
                                <img src="<%= request.getContextPath()%>/images/btn/functions1/login.gif" class="btn" />
                            </a>
                        </li>
                        <li>
                            <a href="#" onclick="resetPassLogin('submit');">
                                <img src="<%= request.getContextPath()%>/images/btn/functions1/reset_password.gif" class="btn" />
                            </a>
                        </li>
                        <li>
                            <a href="designer/usersignin/signin.html">
                                <img src="<%= request.getContextPath()%>/images/btn/functions1/create_account.gif" class="btn" />
                            </a>
                        </li>
                    </ul>
                    <!-- End Function1 -->
                    <div class="corners_bottom"></div>
                </div>

                <div class="message">
                    <font color="red">
                        ${errors_username}
                        ${errors_password}
                        ${userdesabled}
                        ${licence_message}
                    </font>
                </div>
            </div>
        </div>
        <!--END: content -->
    </div>
</body>